Tyrone likes to snack on his big bag of candy. He takes $8$ pieces of candy from the bag each time he snacks. After eating $18$ snacks, there are only $6$ pieces of candy remaining in the bag. The number $c$ of pieces of candy remaining in the bag is a function of $s$, the number of snacks Tyrone eats. Write the function's formula. $c=$
Tyrone takes the same number of candy pieces each time, so we're dealing with a linear relationship. We could write the desired formula in slope-intercept form: $c= ms+ b$. In this form, $ m$ gives us the slope of the graph of the function and $ b$ gives us the $y$ -intercept. Our goal is to find the values of $ m$ and $ b$ and substitute them into this formula. We know that each snack Tyrone eats decreases the number of candy pieces remaining by $8$, so the slope $ m$ is ${-8}$, and our function looks like $c={-8}s+ b$. We also know that $6$ pieces of candy remain after $18$ snacks, which means that when $s=18$, $c=6$. We can substitute this into the formula of the function to find $ b$ : $\begin{aligned}{-8}\cdot18+ b&=6\\\\ -144+ b&=6\\\\ b&={150}\end{aligned}$ This means the bag of candy initially contained $150$ pieces of candy. Since $ m = {-8}$ and $ b = {150}$, the desired formula is: $c={-8}s+{150}$